package demo;

import java.net.IDN;

/**
 * @author SwordFall
 * <p>
 * final 类
 * <p>
 * Translates a string from Unicode to ASCII Compatible Encoding (ACE),
 * as defined by the ToASCII operation of RFC 3490.
 **/
public class IDNDemo {



    public static void main(String[] args) {
        String input = "www.baidu.com";
        String ascii = IDN.toASCII(input);
        String unicode = IDN.toUnicode(input);

        System.out.println("Input:" + input);
        System.out.println("toAscii (input): " + ascii);
        System.out.println("toUnicode (input): " + unicode);
    }
}
